#coding=utf-8

import socket

s = socket.socket()
s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)

s.connect(('127.0.0.1', 10001))

while 1:
	cmd = raw_input('cmd: ').strip()
	msg = raw_input('msg: ').strip()
	s.send('%s\t%s' %(cmd, msg))
	buf = s.recv(1024)